﻿<KContext Value="context">
    <Router AppAssembly="typeof(Program).Assembly" AdditionalAssemblies="Config.Assemblies">
        <Found Context="routeData">
            <KRouteData Value="routeData">
                <RouteView RouteData="routeData" DefaultLayout="typeof(BootLayout)" />
            </KRouteData>
        </Found>
        <NotFound>
            <h1>404</h1>
        </NotFound>
    </Router>
    <KBlazorUI />
</KContext>

@code {
    private UIContext context;

    [Parameter] public string IPAddress { get; set; }
    [Parameter] public bool IsMobile { get; set; }

    protected override void OnInitialized()
    {
        context = new UIContext();
        context.IPAddress = IPAddress;
        context.IsMobile = IsMobile;
        base.OnInitialized();
    }
}